home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib18.dsk
/
LORES-HIRES PLOTTER.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
1KB
|
29 lines
10 GR : HOME : GOTO 30
20 C = N -C: PLOT X,Y: RETURN
30 HGR : VTAB 21
40 PRINT "COMMANDS ARE Y (YES, PLOT), N (NO PLOT), U (UP), D (DOWN), L (LEFT), R (RIGHT), H (HGR 1), G (GR), CTRL-C TO EXIT"
50 CALL -1994: POKE -16298,0: HCOLOR= 7:X = 19:Y = X
60 N = 6:NP = 1
70 FOR I = 0 TO 1:K = PEEK( -16384):I = K >128: GOSUB 20: NEXT I: POKE -16368,0
80 IF K = 213 THEN GOTO 220
90 IF K = 196 THEN GOTO 240
100 IF K = 210 THEN GOTO 260
110 IF K = 204 THEN GOTO 280
120 IF K = 217 THEN N = 12:NP = 0
130 IF K = 206 THEN N = 6:NP = 0
140 IF K = 205 THEN N = 6:NP = 1
150 IF K = 200 THEN POKE -16297,0
160 IF K = 199 THEN POKE -16298,0
170 IF K = 195 THEN HGR : GR :PC = 0
180 C = 0: GOTO 70
190 IF NP THEN COLOR= PC: PLOT X,Y: RETURN
200 IF N = 6 THEN HCOLOR= 4
210 HPLOT 100 +X,100 +Y: HCOLOR= 7: COLOR= N *(N = 12): PLOT X,Y: RETURN
220 IF Y = 0 THEN PRINT CHR$(7);: GOTO 70
230 GOSUB 190:Y = Y -1:PC = SCRN( X,Y): GOTO 70
240 IF Y = 39 THEN PRINT CHR$(7);: GOTO 70
250 GOSUB 190:Y = Y +1:PC = SCRN( X,Y): GOTO 70
260 IF X = 39 THEN PRINT CHR$(7);: GOTO 70
270 GOSUB 190:X = X +1:PC = SCRN( X,Y): GOTO 70
280 IF X = 0 THEN PRINT CHR$(7);: GOTO 70
290 GOSUB 190:X = X -1:PC = SCRN( X,Y): GOTO 70